/**
 * Copyright (c) 2016-2019 人人开源 All rights reserved.
 * <p>
 * https://www.renren.io
 * <p>
 * 版权所有，侵权必究！
 */

package com.cn.xiaonuo.tcrfinance.tcrusers.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cn.xiaonuo.tcrfinance.tcrusers.entity.PvGzGwj;
import com.cn.xiaonuo.tcrfinance.tcrusers.entity.PvGzGwjLog;
import com.cn.xiaonuo.tcrfinance.tcrusers.entity.PvUserEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 购物卷
 *
 * @author
 */
@Repository
public interface HpcGwjMapper extends BaseMapper<PvGzGwj> {
    Integer addGwj(@Param("gwjNum") BigDecimal gwjNum, @Param("phone") String phone);

    List<Map<String, Object>> selectBackGwjAmounts(@Param("userId") String userId);

    List<Map<String, Object>> selectBackGwjDetail(@Param("userId") String userId, @Param("begin") String begin, @Param("end") String end, @Param("type") String type);

    Integer addGwjByFinance(@Param("gwjNum") BigDecimal gwjNum, @Param("phone") String phone,@Param("sourceId") String sourceId,@Param("remark") String remark);

    List<Map<String, Object>>  consumDetail(PvUserEntity pvUserEntity);

    Double  consumSum(PvUserEntity pvUserEntity);

    List<PvGzGwjLog>  xczxGwjLog(PvGzGwjLog pvGzGwjLog);

    BigDecimal  xczxGwjSum(PvGzGwjLog pvGzGwjLog);



}
